package com.typhoon.rpc.sample;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.typhoon.rpc.client.RpcProxy;
import com.typhoon.rpc.sample.service.UserService;

/**
 * Hello world!
 *
 */
public class Consumer 
{
    public static void main( String[] args )
    {
    	ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        RpcProxy rpcProxy = context.getBean(RpcProxy.class);
        
        UserService userService = rpcProxy.create(UserService.class);
        System.out.println(userService.sayHelloTo("Jack Ma"));
    }
}
